import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import admin from '@/components/admin'
import list from '@/components/list'
import edit from '@/components/edit'
import examine from '@/components/examine'


Vue.use(Router)

export default new Router({
  // mode: 'history',
  base: '/',
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/admin',
      name: 'admin',
      component: admin,
      children:[
        {
          path: '/list',
          name: 'list',
          component: list
        },
        {
          path: '/edit/:user_id',
          name: 'edit',
          component: edit
        },
        {
          path: '/examine/:user_id',
          name: 'examine',
          component: examine
        }
      ]
    }
  ]
})
